//
//  Model.swift
//  Archive
//
//  Created by LiynXu on 2016/9/30.
//  Copyright © 2016年 LiynXu. All rights reserved.
//

import Cocoa

class Model: NSObject,NSCoding {
    var number:Int32!
    var identifer:String!
    
    func encodeWithCoder(aCoder: NSCoder) {
        aCoder.encodeInt(self.number, forKey: "number")
        aCoder.encodeObject(self.identifer, forKey: "identifer")
    }
    
    init(number:Int32,identifer:String) {
        self.number = number
        self.identifer = identifer
    }
    required  init?(coder aDecoder: NSCoder) {
        //super.init()
        self.number = aDecoder.decodeIntForKey("number")
        self.identifer = aDecoder.decodeObjectForKey("identifer") as! String
    }

}

